-
Notifications
You must be signed in to change notification settings - Fork 421
fix(event_handler): prioritize static over dynamic route to prevent order of route registration mismatch #2458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
As the failing test is showing, it seems we might be breaking some existing behavior. Let me look into this deeper. |
Ok, tried a new approach which changes some private properties, which I think it's ok. |
looking 👀 |
all good here provided CI pass now. Leaving to @leandrodamascena to merge as he expressed he wanted to learn about the fix. |
Leandro just shared he's learned it 2 hours ago. GH Actions seems to be experiencing operational issues... :/, so I'll merge it on the basis that We'll know either way once they resolve capacity management issues. GREAT work @rubenfonseca investigating and fixing it. |
…rder of route registration mismatch (#2458) Co-authored-by: heitorlessa <[email protected]>
…rder of route registration mismatch (aws-powertools#2458) Co-authored-by: heitorlessa <[email protected]>
Issue number: #2439
Summary
Changes
This PR changes the priority of route matching, so that the most specific route is matched first.
User experience
Take into consideration the following code:
Before this change,
/studies/fetch
would match the first route, because it's a prefix of/studies/<studyid>
. After this change, the most specific route is matched first, so/studies/fetch
will match the second route.Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.